package com.ruoyi.system.domain;

import javax.persistence.*;

import com.ruoyi.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import org.hibernate.annotations.GenericGenerator;

/**
 * 角色和职责关联信息对象 sys_role_post
 * 
 * @author youde
 * @date 2022-11-16
 */
@Entity
@Table(name = "sys_role_post")
@GenericGenerator(name = "uuid2", strategy = "com.ruoyi.common.utils.IDUtils")
public class SysRolePost extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 角色ID */
    @Excel(name = "角色ID")
    @Column(nullable = false, length = 19, columnDefinition = "char")
    private String roleId;

    /** 职责id */
    @Excel(name = "职责id")
    @Column(nullable = false, length = 19, columnDefinition = "char")
    private String postId;

    /** 职责名称 */
    @Excel(name = "职责名称")
    @Column(columnDefinition = "varchar(50)")
    private String postname;

    /** 职责编码 */
    @Excel(name = "职责编码")
    @Column(columnDefinition = "varchar(50)")
    private String postcode;

    /** 主键 */
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY,generator = "uuid2")
    @Column(columnDefinition = "char(19)")
    private String rolePostId;

    public void setRoleId(String roleId) 
    {
        this.roleId = roleId;
    }

    public String getRoleId()
    {
        return roleId;
    }
    public void setPostId(String postId)
    {
        this.postId = postId;
    }

    public String getPostId()
    {
        return postId;
    }
    public void setPostname(String postname) 
    {
        this.postname = postname;
    }

    public String getPostname() 
    {
        return postname;
    }
    public void setPostcode(String postcode) 
    {
        this.postcode = postcode;
    }

    public String getPostcode() 
    {
        return postcode;
    }
    public void setRolePostId(String rolePostId) 
    {
        this.rolePostId = rolePostId;
    }

    public String getRolePostId() 
    {
        return rolePostId;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("roleId", getRoleId())
            .append("postId", getPostId())
            .append("postname", getPostname())
            .append("postcode", getPostcode())
            .append("rolePostId", getRolePostId())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("remark", getRemark())
            .toString();
    }
}